package chixing.day07.inherited;

public class DiscountProductTest {
    public static void main(String[] args) {
        //无参构造创建对象
        DiscountProduct discountProduct1 = new DiscountProduct();
        discountProduct1.setProName("电脑");
        discountProduct1.setProPrice(9876.9f);
        discountProduct1.setDiscountRate(9.5f);
        System.out.println(discountProduct1.getProName());
        System.out.println(discountProduct1.getProPrice());
        System.out.println(discountProduct1.getDiscountRate());
        System.out.println(discountProduct1.toString());
        System.out.println("------------------------");
        DiscountProduct discountProduct2 = new DiscountProduct(1,"手机",6789.9f,8.9f);
        System.out.println(discountProduct2);

        discountProduct2.fun1();


    }
}
